"use strict";

import { get, post, put, del } from "../../lib/http.js";

const url = "/index";

// save
export const save = (path, data, success, error) => post(url + path, data, success, error);

// update
export const update = (path, data, success, error) => post(url + path, data, success, error);

// delete
export const delData = (path, data, success, error) => del(url + path, data, success, error);

// login
export const login = (data, success, error) => post(url + "/login/login", data, success, error);
export const reg = (data, success, error) => post(url + "/login/reg", data, success, error);

// upload file
export const uploadFile = (path, data, success, error) => post(url + path, data, success, error);
